

#include <QtGui>
#include <QtDBus>
#include <QtDeclarative>

#include "dynamicnameinterface.h"
#include "dynamicnameproxy.h"

using namespace com::kdab;

int main(int argc, char **argv)
{
  QApplication app(argc, argv);

  QDeclarativeView view;

  QDBusConnection dbus = QDBusConnection::sessionBus();

#if 0
  DynamicNameProxy nameInterface;
#else
  DynamicName nameInterface( "com.kdab.DynamicName", "/DynamicName", dbus);
#endif

  view.engine()->rootContext()->setContextProperty("iface", &nameInterface);

  view.setSource(QUrl("slave.qml"));
  view.show();

  return app.exec();
}
